import { RouteRecordRaw } from 'vue-router'
import Layout from '@/layout/index.vue'

const rootRoute: RouteRecordRaw = {
  name: 'root',
  path: '/',
  component: Layout,
  meta: {
    title: 'root'
  }
}

// 登录
const loginRoute: RouteRecordRaw = {
  name: 'login',
  path: '/login',
  component: () => import('@/views/Login/index.vue')
}

// 错误页面
const errorRoute: RouteRecordRaw = {
  name: 'errorPage',
  path: '/:path(.*)*',
  component: Layout,
  meta: {},
  children: [
    {
      path: '/:path(.*)*',
      name: 'ErrorPageSon',
      component: () => import('@/views/Error/404.vue')
    }
  ]
}

export { rootRoute, loginRoute, errorRoute }
